package javaday02;

import java.util.ArrayList;
import java.util.Random;

public class Homework4RandomNumber {
	public static void main(String args[]){
		ArrayList<Integer> List =new ArrayList();
		Rnumber(List);
		System.out.println(List);
	}
	
	public static ArrayList Rnumber(ArrayList<Integer> List){
		Random random = new Random();
		for(int i=0;i<6;i++){
			int x= random.nextInt(33)+1;
			for(int j=0;j<List.size();j++){
				while(x==List.get(j)){
					x=random.nextInt(33)+1;
				}
			}
			List.add(x);
		}
		return List;
	}
}
